#pragma once

extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <getopt.h>
#include <time.h>
#include <pthread.h>

#include "hb_vp_api.h"
#include "hb_vin_api.h"
#include "hb_vps_api.h"
#include "hb_mipi_api.h"
#include "hb_vio_interface.h"
#include "hb_sys.h"
#include "hb_common.h"
#include "hb_type.h"
#include "hb_errno.h"
#include "hb_comm_video.h"
#include "hb_venc.h"
#include "hb_rgn.h"

int ion_open(void);
int ion_alloc_phy(int size, int *fd, char **vaddr, uint64_t * paddr);
int dumpToFile2plane(char *filename, char *srcBuf, char *srcBuf1, unsigned int size, unsigned int size1);
int dumpToFile2planeStride(char *filename, char *srcBuf, char *srcBuf1, unsigned int size, unsigned int size1, int width, int height, int stride);

}

int prepare_user_buf(void *buf, uint32_t size_y, uint32_t size_uv);

